From: Tianling Shen Date: Thu, 13 Apr 2023 20:45:24 +0000 (+0800) Subject: luci-base: http.uc: fix reference error of undeclared variable `err` X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=588c6a1e4bc4c79dab2341ca1c9541e42aaf8665;p=project%2Fluci.git luci-base: http.uc: fix reference error of undeclared variable `err` The variable `err` was used without initialized. Signed-off-by: Tianling Shen --- diff --git a/modules/luci-base/ucode/http.uc b/modules/luci-base/ucode/http.uc index e8982e77a0..579dda3ced 100644 --- a/modules/luci-base/ucode/http.uc +++ b/modules/luci-base/ucode/http.uc @@ -29,7 +29,7 @@ export let HTTP_MAX_CONTENT = 1024*100; // 100 kB maximum content size // o Boolean which indicates whether the current chunk is the last one (eof) export function mimedecode_message_body(src, msg, file_cb) { let len = 0, maxlen = +msg.env.CONTENT_LENGTH; - let header, field, parser; + let err, header, field, parser; parser = multipart_parser(msg.env.CONTENT_TYPE, function(what, buffer, length) { if (what == parser.PART_INIT) {